package shili;

import org.aopalliance.intercept.Joinpoint;
import org.apache.log4j.Logger;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;


/**
 * ErrorLogger
 *
 * @author boy
 * @since 2023/10/16
 */
@Aspect
public class ErrorLogger {
    private static final Logger log= Logger.getLogger(ErrorLogger.class);
  @AfterThrowing(pointcut="execution(* service.UserService.*(..))",throwing="e")
    public void afterThrowing(Joinpoint jp,RuntimeException e){
      log.info(jp.getSignaturn().getName());
    }
}
